<template>
  <div class='meeting-paper'>
    <div id="editor"></div>
  </div>
</template>
<script>
export default {
  components: {},
  name: "",
  data() {
    return {
      editor: null
    };
  },
  methods: {
    // 获取富文本内容
    getContent() {
      var content = this.editor.txt.html();
    },
    setContent(html) {
      this.editor.txt.html(html);
    }
  },
  created() {},
  mounted() {
    var E = window.wangEditor;
    this.editor = new E("#editor");
    // 配置上传图片地址
    this.editor.customConfig.uploadImgServer = "/upload";

    this.editor.customConfig.onblur = function(html) {
      // html 即编辑器中的内容
      console.log("onblur", html);
    };
    this.editor.create();
  }
};
</script>
<style lang="scss" scoped>
.meeting-paper {
  padding: 15px 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;

  #editor {
    height: 60%;
    flex-grow: 1
  }
}
</style>